<?php

class FBLoginView {
	private static $k_location = 'Location: ';	
	private static $k_phpSelf = 'PHP_SELF';
	private static $k_logout = 'logout';
	
	/**
	* @return bool
	*/
	public function triedToLogout() {
		return isset($_GET[self::$k_logout]);
	}	
	
	public function ReloadPage() {
		session_write_close();
		header(self::$k_location . $_SERVER[self::$k_phpSelf]);		
	}
	
	/**
	* Hämtar dynamisk in/ut-logningsknapp
	*
	* @return String FBXML
	*/
	public function getLoginButton() {
		return '<fb:login-button autologoutlink="true"></fb:login-button>';
	}
}
